import SquareButton from "../../components/squareButton.js";

export default {
    components: {
        'square-button': SquareButton
    },
    setup() {
        const router = VueRouter.useRouter();

        function backToIndex() {
            router.push({path: "/"});
        }

        function onBackToIndexClick() {
            backToIndex();
        }

        function onConsultationClick() {
            router.push({path: '/doctor_main/'})
        }

        function onAnswerClick() {
            router.push('/topic_info/1');
        }

        return {
            onBackToIndexClick, onConsultationClick, onAnswerClick
        }
    },
    template: `
<div style="background: url('/images/background/doctor_login.png') no-repeat;
    background-size: 100% 100%;height: 100%;"></div>
<square-button background-url="/images/logo.png"
                   :width-in-parent=15
                   left="2%"
                   top="2%"
                   :z-index="1031"
                   @onClick="onBackToIndexClick"
></square-button>
<square-button background-url="/images/doctor_login/patient_consultation.png"
                   :width-in-parent=15
                   right="40%"
                   top="35%"
                   :z-index="1031"
                   @onClick="onConsultationClick"
></square-button>
<square-button background-url="/images/doctor_login/answer.png"
                   :width-in-parent=15
                   right="15%"
                   top="35%"
                   :z-index="1031"
                   @onClick="onAnswerClick"
></square-button>

`,
}
